package view
{
	import com.bit101.components.HBox;
	import com.bit101.components.VBox;
	
	import component.Image;
	
	import flash.display.Graphics;
	import flash.display.Sprite;
	import flash.geom.Point;
	import flash.text.TextField;
	
	import models.ModelLocator;
	
	import utils.DrawUtils;
	
	public class BaseFrame extends Sprite
	{
		//private var ary:Array = ModelLocator.getInstance().boderAry;
		public function BaseFrame()
		{
			super();
			drawThis();
		}
		private function drawThis():void{
			var p1:Point = new Point(0,0);//763,389
			var p2:Point = new Point(763,0);
			var p3:Point = new Point(763,389);
			var p4:Point = new Point(0,389);
			var g:Graphics = this.graphics;
			g.lineStyle(2,0xaa503c);
			DrawUtils.drawDashed(g,p1,p2,5,5);
			DrawUtils.drawDashed(g,p2,p3,5,5);
			DrawUtils.drawDashed(g,p3,p4,5,5);
			DrawUtils.drawDashed(g,p4,p1,5,5);
			
			
		}
		public function setInfo(info:String):void{
			var txt:TextField = new TextField();
			txt.x = 30;
			txt.y = 18;
			this.addChild(txt);
			txt.width = 700;
			txt.height = 25;
			txt.selectable = false;
			txt.htmlText = info;
		}
		public function remove():void{
			if(this.parent){
				this.parent.removeChild(this);
			}
		}
	}
}